package com.xxx.kjds.controller;


import com.xxx.kjds.entity.Goods;
import com.xxx.kjds.entity.OrderGoods;
import com.xxx.kjds.service.OrderGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/ordergoods")
public class OrderGoodsController {
    @Autowired
    private OrderGoodsService OrderGoodsService;

    @RequestMapping("/selectGoodByOrderID")
    public List<Goods> selectGoodByOrderID(Integer id){
        return OrderGoodsService.selectGoodByOrderID(id);
    }


    @RequestMapping("/selectOrderGoodsByGoodsIDAndOrderID")
    public OrderGoods selectByPrimaryKey(Integer goodsID , Integer  orderID){
        return OrderGoodsService.selectByPrimaryKey(goodsID , orderID);
    }
}
